package Java实验.实验三;

import java.util.Scanner;

public class Demo1 {
    public static class Yard {
        private double length;
        private double width;

        public Yard() {
        }
        public Yard(double length, double width) {
            this.length = length;
            this.width = width;
        }

        public double getPerimeter() {
            return (length + width) * 2;
        }

        public double getAcreage() {
            return length * width;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        int width = sc.nextInt();
        Yard yard = new Yard(length, width);
        System.out.print(String.valueOf(yard.getPerimeter()) + ' ' + String.valueOf(yard.getAcreage()));
    }
}
